package com.nycreativity.elecreativity.service;

import com.baomidou.mybatisplus.extension.service.IService
import com.nycreativity.elecreativity.entity.param.address.AddressAddParam
import com.nycreativity.elecreativity.entity.param.address.AddressUpdateParam
import com.nycreativity.elecreativity.entity.po.Address

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author sxt && ttxxi
 * @since 2021-03-10
 */
interface AddressService : IService<Address>{

    /**
     * 根据用户id查询收获地址
     */
    fun queryByUserId(userId : Long) : List<Address>

    /**
     * 添加地址
     */
    fun add(addressAddParam: AddressAddParam): Boolean

    /**
     * 根据id修改地址
     */
    fun updateById(addressUpdateParam: AddressUpdateParam): Boolean

    /**
     * 根据id删除
     */
    fun deleteById(id: Long)

}
